Texture.this

Creates a new texture by loading an image from a file or a resource.

The file format is detected automatically. The supported formats are PNG and JPEG, though more formats might be available.

If %NULL is returned, then @error will be set.

This function is threadsafe, so that you can e.g. use GTask and g_task_run_in_thread() to avoid blocking the main thread while loading a big image.

  1. this(GdkTexture* gdkTexture, bool ownedRef)
  2. this(string path, bool resource)
    class Texture
    this
    (
    string path
    ,
    bool resource = false
    )
  3. this(Pixbuf pixbuf)
  4. this(Bytes bytes)
  5. this(FileIF file)

Parameters

path string

the filename or resourcename to load

resource bool

true if load from resource

Return Value

A newly-created GdkTexture

Throws

GException on failure. ConstructionException GTK+ fails to create the object.

Meta